package pong.event;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import pong.Main;
import pong.lan.Lan;
import pong.lan.ListItem;

public class Unirse implements ActionListener{

	@Override
	public void actionPerformed(ActionEvent e) {
		
		synchronized (Lan.lock) {
			ListItem item = (ListItem) Main.list.getSelectedValue();
			if(item != null){
				Main.unirse(item);
			}
		}
	}

	

}
